package org.cnbi.service.impl;

import org.cnbi.dao.IHandleDao;
import org.cnbi.service.IMenuService;
import org.cnbi.utils.exception.BusinessException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Copyright © 2014中国经邦. All rights reserved.
 * ----Menu Manage 用户管理Service
 * @author zhh
 * @date 2014年5月9日下午13:57
 * @cnbi-service
 */
@Service("menuService")
public class IMenuServiceImpl implements  IMenuService{
	
	@Autowired
	private IHandleDao handleDao;

	@Override
	public void addMenu(String sql, Object obj) {
		try {
			 handleDao.execute(sql, obj);
		} catch (Exception e) {
			throw new BusinessException("执行..添加[菜单]..."+sql+e.getMessage());
		}
		
	}

	@Override
	public void removeMenu(String sql, Object obj) {
		try {
			 handleDao.execute(sql, obj);
		} catch (Exception e) {
			throw new BusinessException("执行..删除[菜单]..."+sql+e.getMessage());
		}
		
	}

	@Override
	public void editMenu(String sql, Object obj) {
		try {
			 handleDao.execute(sql, obj);
		} catch (Exception e) {
			throw new BusinessException("执行..修改[菜单]..."+sql+e.getMessage());
		}
		
	}
	
	

}
